import { IMenuOptionTagConfigDataMap } from "@/types";

export interface IYs4funToolsDragConfig {
  isDraggable: boolean;
  isDragReady: boolean;
  eleSize: {w: number, h: number};
  position: { x: number; y: number; };
}

export interface IYs4funToolsAppState {
  toolsDragConfig: IYs4funToolsDragConfig & {
    isDragging: boolean;
    offset: { x: number; y: number };
    pressTimer: NodeJS.Timeout | null;
  };
}

export interface IYs4funToolsPropData {
  toolsDragConfig: IYs4funToolsDragConfig;
}

export interface IYs4funToolsPropConfigs {
  menuOptionTagConfigDataList: IMenuOptionTagConfigDataMap[];
}

export interface IYs4funToolsPropMethods {
  toggleDraggable: () => void;
  updatePosition: (x: number, y: number) => void;
  setDragReady: (ready: boolean) => void;
}

export interface IYs4funToolsAppContextProps {
  data: IYs4funToolsPropData;
  config: IYs4funToolsPropConfigs;
  methods: IYs4funToolsPropMethods;
}

export interface IMenuOptionsPanelState {
    isDragging: boolean;
    pressTimer: NodeJS.Timeout | null;
}
